<template>
  <div id="app">
    <!--导航-->
    <v-nav/>
    <!--主体：首页，新闻等-->
    <router-view/>
    <!--底部-->
    <v-footer/>
  </div>
</template>

<script>
import vNav from './components/nav.vue'
import vFooter from './components/footer.vue'

export default {
  components: {
    vNav,
    vFooter
  },
  mounted() {
    this.onresize()
    window.onresize = ()=>{
      this.onresize()
    }
  },
  methods:{
    onresize(){
      if(window.innerWidth < 1200){
        this.$store.commit('changeType',2)
      }else{
        this.$store.commit('changeType',1)
      }
    }
  }
}
</script>

<style lang="scss">
*{
  margin: 0;
  padding: 0;
}
::-webkit-scrollbar{
  width: 0;
  height: 0;
}
</style>
